/**this app is used to clear a file*/
#include<errno.h>
#include<stdio.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <string.h>
#include <unistd.h>
#include <stdlib.h>

int main(int argc,char **argv){
	int fd,ret;
	if(argc<2){
		perror("argc should bigger than 2");
		return 1;
	}
	fd=open(argv[1],O_RDONLY | O_TRUNC);
	if(-1==fd){
		perror("open error");
		return 1;
	}
	close(fd);
	return 1;
}
